#!/usr/bin/python
# -*- coding: UTF-8 -*-
import json
import time
import requests

def x(s):
	s+=10
	return s

def jsons():
	data = [ { 'a' : 1, 'b' : 2, 'c' : 3, 'd' : 4, 'e' : 5 } ]
	#序列化
	data2 = json.dumps(data) 
	return data2

def djson():
	
	jsonData = '[{"a":1,"b":2,"c":3,"d":4,"e":5},{"a":1,"b":2,"c":3,"d":4,"e":5}]';
	#JSON 反序列
	text = json.loads(jsonData)
	dd=0
	for x in range(len(text)):
		dd=dd+text[x]["c"]
	return dd

def xh():
	for x in range(10):
		if x==5:
			continue
		if x%2!=0:
			continue
		print(x)
	print("\n")

def whiles():
	i=0
	while True:
		if i==10:
			break
		print(i)
		i+=1
def toint():
	a='10'
	b=10
	print(int(a)+b)
def tostr():
	a='z'
	b='z'
	print(a+b+str(time.time()))

def inputs():
	str = raw_input("请输入：")
	print("你输入的内容是: %s", str)

def get():
	url='https://baidu.com';
	response=requests.get(url)
	print(response.text)
def files():
	f=open('result.txt',"r")
	print(f.readlines())
if __name__=='__main__':
	print(x(10))
	print(jsons())
	print(djson())
	xh()
	whiles()
	toint()
	tostr()
	inputs()
	files()
	get()
	

